package com.geekaca.d3;

public class ForShuixianhua {
    public static void main(String[] args) {

//        int a = 156;
//        System.out.println(a / 100);
//        System.out.println(a / 10 % 10);
//        System.out.println(a % 10);

        for (int i = 100; i <= 999; i++) {
            int baiwei = i / 10 / 10 % 10;
//            System.out.println(baiwei);
            int shiwei = i % 100 / 10;
//            System.out.println(shiwei);
            int gewei = i % 10;
//            System.out.println(gewei);
//            System.out.println("=======" + i + "=======");

            if (gewei * gewei * gewei + shiwei * shiwei * shiwei + baiwei * baiwei * baiwei == i) {
                System.out.println(i + "是水仙花数");
            }


        }
    }
}
